const path = require('path');

const _ = require('lodash');

const baseConfig = {
  app: {
    root: path.normalize(`${__dirname}/../../..`),
    env: process.env.NODE_ENV || 'development',
    secret: process.env.SECRET || 'Xsj_crasheye_888888',
    expires: 30 * 24 * 60 * 60,
  },
};

const extraConfig = require(`./${baseConfig.app.env}.js`);
module.exports = _.merge(baseConfig, extraConfig || {});
